﻿using HLStock.Common;
using HLStock.Model;
using HLStock.MyType;
using HLStock.WmsApi;
using HLStock.WmsApi.AuthenticationInjection;
using HLStock.WmsService;
using Microsoft.AspNetCore.Mvc;

namespace HLStock.Controllers
{

    public class OrderController : MyBaseController<OrderModel>
    {
        protected override BaseServiceProvider<OrderModel> getSp()
        {
            return ServiceLoader.GetService<OrderServiceProvider>();
        }
        [HttpPost, MyAuthorize(AuthorizeLevelEnum.AllUser)]
        public ResponseData<OrderModel> SearchBySubOrder(dynamic data)
        {
            var code = data.code.ToString();
            var sp = getSp() as OrderServiceProvider;
            var result = new ResponseData<OrderModel>(sp.SearchBySubOrder(code));
            return result;
        }
    }

}
